From: Carlos Garnacho Date: Wed, 16 Nov 2022 10:22:18 +0000 (+0100) Subject: keyboard: Explicitly destroy swipeTracker after emoji panel destruction X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~267 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7e4f7c7e5b9c3d038250e8344b1e4b4b98e2ac10;p=gnome-shell.git keyboard: Explicitly destroy swipeTracker after emoji panel destruction Even though the emoji panel may be destroyed with the OSK, the swipeTracker that is set up to navigate between pages is left lingering, and handling events for some gestures in the stage. This results in warnings like: JS ERROR: TypeError: this._panel is null set delta@resource:///org/gnome/shell/ui/keyboard.js:720:9 _onSwipeUpdate@resource:///org/gnome/shell/ui/keyboard.js:750:22 _updateGesture@resource:///org/gnome/shell/ui/swipeTracker.js:670:14 vfunc_gesture_progress@resource:///org/gnome/shell/ui/swipeTracker.js:288> on touch interaction after the OSK was shown and dismissed. In order to fix this, issue explicit destruction of the swipeTracker when the emoji pager actor is destroyed. Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index a158425a6..66f35ea83 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -685,6 +685,15 @@ var EmojiPager = GObject.registerClass({ swipeTracker.connect('update', this._onSwipeUpdate.bind(this)); swipeTracker.connect('end', this._onSwipeEnd.bind(this)); this._swipeTracker = swipeTracker; + + this.connect('destroy', () => this._onDestroy()); + } + + _onDestroy() { + if (this._swipeTracker) { + this._swipeTracker.destroy(); + delete this._swipeTracker; + } } get delta() {